# This Makefile is only used when building Debian packages  

VERSION=2.0.0
NAME=augim-${VERSION}
CTRLFILES=control
SOURCEDIR=../src
SOURCE=${SOURCEDIR}/main.py ${SOURCEDIR}/window.py ${SOURCEDIR}/app.py ${SOURCEDIR}/common ${SOURCEDIR}/icons ${SOURCEDIR}/imagebrowser ${SOURCEDIR}/imageeditor ${SOURCEDIR}/imageprocessing ${SOURCEDIR}/taskmonitor

all:
	echo "foo"
	
install: clean 
	cp augim ${DESTDIR}/usr/bin/
	mkdir -p ${DESTDIR}/usr/lib/augim
	cp -r ${SOURCE} ${DESTDIR}/usr/lib/augim
	rm -rf ${DESTDIR}/usr/lib/augim/icons/graffle
	mkdir -p ${DESTDIR}/usr/share/applications/hildon
	cp augim.desktop ${DESTDIR}/usr/share/applications/hildon
	find ${DESTDIR}/usr/lib/augim -name '.svn' | xargs rm -rf

deb:
	mkdir ${NAME}
	cp Makefile augim augim.desktop ${NAME}
	cd ${NAME} && dh_make -s -c gpl -e madsk@cs.au.dk --createorig
	cp ${CTRLFILES} ${NAME}/debian/
	cd ${NAME} && dpkg-buildpackage -rfakeroot

clean:
	find . -name '*.pyo' | xargs rm -f
